[Fix][operator] Fix volcano podgroup stuck in inqueue state after rayjob completes#4476
Open
fangyinc wants to merge 3 commits intoray-project:masterfrom
Open
[Fix][operator] Fix volcano podgroup stuck in inqueue state after rayjob completes#4476fangyinc wants to merge 3 commits intoray-project:masterfrom
fangyinc wants to merge 3 commits intoray-project:masterfrom
Conversation
Contributor
Author
|
@Future-Outlier @andrewsykim PTAL. Thanks you~ The failed CI does not seem to be caused by this PR. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
When a RayJob completes (SUCCEEDED/FAILED), the associated RayCluster is deleted (when
shutdownAfterJobFinishes: true), but the Volcano PodGroup remains stuck inInqueuestate. This causes queue resources to remain occupied even though the job has finished, preventing new jobs from being scheduled.Root Cause
KubeRay never implemented cleanup logic for Volcano PodGroups. When RayJob completes:
Pending→Inqueueby Volcano's control loopSolution
Added a
CleanupOnCompletion()method to theBatchSchedulerinterface that deletes the PodGroup when RayJob reaches terminal state. Deleting is necessary because marking asCompleteddoesn't work - Volcano's scheduler overrides the status in its next cycle.Related issue number
Closes #4473
Checks